home *** CD-ROM | disk | FTP | other *** search
- global theDelim, gWhichBit, gAcrobatFile, gSearchFile, gAcrobatPath, acroSearchPath
-
- on startMovie
- if the machineType = 256 then
- baRegister("Wheeler Multimedia Consulting", 10217590)
- set theDelim to "\"
- else
- set theDelim to ":"
- end if
- checkVersion()
- checkAcrobat()
- end
-
- on checkVersion
- if the machineType = 256 then
- set os to baVersion("os")
- if os = "Win16" then
- set gWhichBit to "16"
- else
- set gWhichBit to "32"
- end if
- end if
- end
-
- on checkAcrobat
- if the machineType = 256 then
- set gAcrobatPath to baFindApp("pdf")
- else
- set gAcrobatPath to baFindApp("CARO")
- end if
- set acroStatus to baFileExists(gAcrobatPath)
- if acroStatus <> 1 then
- go("1")
- else
- set the itemDelimiter to theDelim
- set pathNum to the number of items in gAcrobatPath - 1
- if the machineType = 256 then
- if gWhichBit = 32 then
- set acroSearchPath to item 1 to pathNum of gAcrobatPath & "\Plug_ins\asrch32.api"
- else
- set acroSearchPath to item 1 to pathNum of gAcrobatPath & "\Plug_ins\acrosrch.api"
- end if
- else
- set acroSearchPath to item 1 to pathNum of gAcrobatPath & ":Plug-Ins:Acrobat‚Ñ¢ Search"
- end if
- set acroSearchStatus to baFileExists(acroSearchPath)
- if acroSearchStatus <> 1 then
- go("1")
- else
- go("2")
- end if
- end if
- set the itemDelimiter to ","
- end
-
- on installAcrobat
- if the machineType = 256 then
- set installerFile to the pathName & "ReadSrch\rs" & gWhichBit & "e301.exe"
- else
- set installerFile to the pathName & "Reader+Search:Reader:Reader 3.01 Installer"
- end if
- open(installerFile)
- halt()
- end
-
- on launchPDF
- baOpenFile(the pathName & "home.pdf", "maximised")
- end
-
- on AcroStop
- set WinHandle to []
- set WinHandle to baWindowList(EMPTY, "Acrobat", 0)
- set maxWins to count(WinHandle)
- if maxWins > 0 then
- repeat with X = 1 to maxWins
- set WindowNumber to getAt(WinHandle, X)
- baCloseWindow(WindowNumber)
- baActivateWindow(WindowNumber)
- if baWindowList(EMPTY, "Acrobat", 0) = [] then
- exit repeat
- end if
- end repeat
- end if
- end
-